<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>吸顶灯效果</title>
		<style>
		body{
			height: 3000px;
		}
		#searchForm{
			border: 1px solid red;
			text-align: center;
			width: 300px;
			position: sticky;
			top: 1px;
		}
		</style>
	</head>
	<body>
		<div id="nav" style="background-color: blue;height: 120px;"></div>
		<div id="searchForm">
			<form>
				<input type="text" name="wd"/><input type="submit"/>
			</form>
		</div>
	</body>
</html>
